package com.sxt.view;

import java.util.Scanner;

import com.sxt.entity.Account;
import com.sxt.service.impl.InputCheck;
import com.sxt.util.InputTools;

/**
 * 普通用户操作界面类
 * @author lovemanai
 *
 */
public class UserATMUI {
	
	private static Scanner input = new Scanner(System.in);
	
	/*
	 * 存款界面
	 */
	public static double despositView() {
		return InputCheck.checkMoney();
	}
	
	/*
	 * 取款界面
	 */
	public static double withdrawView() {
		
		return InputCheck.checkMoney();
	}
	
	/*
	 * 转账界面
	 */
	public static Account tranfsView() {
		String accountNo = InputTools.getString("请输入转入的账号：", input);
		double money = InputCheck.checkMoney();
		
		return new Account(accountNo, money);
	}
	
	/*
	 * 账户信息界面
	 */
	public static void searchView(Account account) {
		System.out.println("账户信息为：");
	}
	
	/*
	 * 操作选项
	 */
	public static int accountOperateView() {
		System.out.println("\n-------操作选项-------\n");
		System.out.println("1.存款");
		System.out.println("2.取款");
		System.out.println("3.转账");
		System.out.println("4.查询");
		System.out.println("0.退出");
		
		return InputTools.getInt("请输入操作选项：", input);
	}
}
